/* 
 * File:   task1d.h
 * Author: oddi
 *
 * Created on October 3, 2010, 3:15 PM
 */

#ifndef _TASK1D_H
#define	_TASK1D_H

#include "mover1d.h"
#include "particles.h"
#include "ebsources.h"
#include "ucgrid1d.h"

#ifdef	__cplusplus
extern "C" {
#endif

    typedef struct struct_boundary_conditions_uc1d {
        floatdig l_phi; //left boundary condition for electrostatic potential
        floatdig r_phi; //right boundary condition for electrostatic potential

        floatdig min_z;
        floatdig max_z;
    } boundary_conditions_uc1d;

    typedef struct struct_particles_grid_mover_set
    {
        pset set;
        pucgrid1d grid;
        pmover mover;
    } pgm_set;


    typedef struct struct_task1d {
        timevar current_timevar;
        timevar start_timevar;
        timevar end_timevar;
        timevar dt;
        
        int num_of_species;
        pgm_set* pgm;

        sources_pack sources;

        boundary_conditions_uc1d bonds;

    } task1d;

    void task1d_add_esource(task1d* task, esource source);
    void task1d_add_bsource(task1d* task, bsource source);
    void task1d_set_add_pgd(task1d* task, pgm_set* pgd_set);
    void task1d_set_boundaries(task1d* task, boundary_conditions_uc1d* bonds);
    void task1d_start_evaluations(task1d* task);
    void task1d_stop_evaluations(task1d*);
    void task1d_clear_task(task1d*);
    void task1d_postprocessing(task1d*);

#ifdef	__cplusplus
}
#endif

#endif	/* _TASK1D_H */

